<?php
namespace app\miniapp\controller\v1;

use app\common\controller\Api;
use app\miniapp\model\GoodsModel;

class Referrals extends Api
{
    protected $noNeedLogin = '*';

    /*
     * 推荐接口
     */
    public function referrals()
    {


        // 第一部分查
        $referrals = GoodsModel::where('index_type', 4)
            ->order('id DESC')
            ->limit(0, 2)
            ->select();


        $this->success('商品列表', [

            'referrals' => $referrals,


        ]);
    }
}